<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:cc="http://java.sun.com/jsf/composite">
    <cc:interface>
        <cc:attribute name="bean"/>
        <cc:attribute name="disativarIncluir"/>
        <cc:attribute name="disativarAtualizar"/>
        <cc:attribute name="disativarRemover"/>
    </cc:interface>
    <cc:implementation>
        <p:panel toggleable="false" closable="false">  
			<f:facet name="header">
				<p:commandButton disabled="#{cc.attrs.disativarIncluir}" value="#{i18n['botao.incluir']}" rendered="#{cc.attrs.bean.objeto.id == null}" action="#{cc.attrs.bean.incluir}" ajax="false" style="width: 120px" image="ui-icon ui-icon-document"/>
				<p:commandButton disabled="#{cc.attrs.disativarAtualizar}" value="#{i18n['botao.atualizar']}" rendered="#{cc.attrs.bean.objeto.id != null}" action="#{cc.attrs.bean.atualizar}" ajax="false" style="width: 120px" image="ui-icon ui-icon-arrowrefresh-1-w"/>				
				<p:commandButton disabled="#{cc.attrs.disativarRemover or cc.attrs.bean.objeto.id == null}" value="#{i18n['botao.remover']}" action="#{cc.attrs.bean.remover}" ajax="false" style="width: 120px" image="ui-icon ui-icon-trash"/>				    	       
				<p:commandButton immediate="true" value="#{i18n['botao.cancelar']}" action="#{cc.attrs.bean.cancelar}" ajax="false" style="width: 120px" image="ui-icon ui-icon-cancel"/>
			</f:facet>
			<cc:insertChildren/>
		</p:panel>
    </cc:implementation>
</html>